﻿<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jQuery网页表格导出Excel文件</title>

<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css">
<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">

<link rel="stylesheet" type="text/css" href="css/demo.css">

</head>
<body>

<div class="container">
	<div class="row">
		<div class="col-md-3" style="padding:2em 0;">
			<button type="button" class="btn btn-success btn-block" id="generate-excel"><i class="fa fa-file-excel-o" aria-hidden="true"></i> 将表格转换为Excel</button>
		</div>
		<div class="col-md-12" style="padding:2em 0;">
			<div class="table-responsive">
			<table class="table table-bordered table-striped" id="test_table">
				<thead>
				  <tr>
					<td>用户名</td>
					<td>抖音ID</td>
					<td>城市</td>
					<td>州</td>
					<td>部门</td>
					<td>选取</td>
					<td>票数</td>
				  </tr>
				</thead>
				<tbody>
				  		<tr>
							<td>
								<span>1</span>
							</td>
							<td>
								<span>Small, Steve </span>
							</td>
							<td>
								<span>New York</span>
							</td>
							<td>
								<span>NY</span>
							</td>
							<td>
								<span>Eastern</span>
							</td>
							<td>
								<span>Metropolitan Region</span>
							</td>
							<td>
								<span>378</span>
							</td>
						</tr>
						
				</tbody>
			  </table>
			</div>
		</div>
	</div>
</div>

<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/jszip/3.1.5/jszip.min.js"></script>
<script type="text/javascript" src="external/FileSaver.js"></script>
<script type="text/javascript" src="scripts/excel-gen.js"></script>
<script type="text/javascript" src="scripts/demo.page.js"></script>

</body>
</html>